SortFields

data class SortFields(val fields: String)

An idiomatic way to handle Pocketbase sorting. Add + before your SortFields object to sort with the records you included on top, or add - if you want those items to come last.

Parameters

fields

the list of fields you want to sort by.

Constructors

Link copied to clipboard
constructor(vararg fields: String)
constructor(fields: String)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun addTo(params: <Error class: unknown class>)

Adds the current SortFields to a request's parameters

Link copied to clipboard
operator fun unaryMinus(): SortFields

Add this in front of a SortFields object to sort the record fields specified in the field list last.

Link copied to clipboard
operator fun unaryPlus(): SortFields

Add this in front of a SortFields object to sort the record fields specified in the field list first.